﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;

namespace Sausage.Domain
{
    public class Helper
    {
        public static UserPrincipal CurrentPrincipal
        {
            get
            {
                if (HttpContext.Current.Request.IsAuthenticated)
                {
                    return (UserPrincipal) HttpContext.Current.User;
                }
                return null;
            }
        }

        public static bool IsAuthenticated
        {
            get
            {
                return HttpContext.Current.Request.IsAuthenticated; 
            }
        }
    }
}
